package com.jrfid.smartcabinet.demo.db.dao

import androidx.room.*

/**
 * author: shihao
 * date: 2020/12/10 10:39
 * description:
 */
interface BaseDao<T> {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertAll(list: MutableList<T>)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(element: T): Long

    @Delete
    fun delete(element: T)

    @Delete
    fun deleteAll(elements: MutableList<T>)

    @Delete
    fun deleteSome(vararg elements: T)

    @Update
    fun update(element: T)
}